/*
 Navicat Premium Data Transfer

 Source Server         : wjchang.cn
 Source Server Type    : MySQL
 Source Server Version : 50719
 Source Host           : wjchang.cn
 Source Database       : db_baby_vote

 Target Server Type    : MySQL
 Target Server Version : 50719
 File Encoding         : utf-8

 Date: 05/24/2019 23:31:38 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `admin_opera_log`
-- ----------------------------
DROP TABLE IF EXISTS `admin_opera_log`;
CREATE TABLE `admin_opera_log` (
  `id` varchar(50) NOT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `admin_user_id` varchar(50) DEFAULT NULL,
  `ip` varchar(20) DEFAULT NULL,
  `user_agent` varchar(100) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `des` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index` (`create_time`,`admin_user_id`,`type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `admin_user`
-- ----------------------------
DROP TABLE IF EXISTS `admin_user`;
CREATE TABLE `admin_user` (
  `id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `account` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `password` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` tinyint(3) unsigned DEFAULT NULL COMMENT '0=god,',
  `rights` text COLLATE utf8_unicode_ci,
  `role` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '角色',
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_login_time` datetime DEFAULT NULL,
  `mobile` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '手机号',
  `wx_id` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '微信-openid 用于微信二维码登录',
  `avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nickname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '姓名',
  `is_enable` tinyint(3) DEFAULT '1' COMMENT '0=禁用，1=启用',
  `remark` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '备注',
  `qq_account` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'QQ号',
  `wx_account` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '微信号',
  `wx_qrcode` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '微信二维码名片',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique` (`id`) USING BTREE,
  KEY `login_index` (`account`,`password`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='后台管理员表';

-- ----------------------------
--  Records of `admin_user`
-- ----------------------------
BEGIN;
INSERT INTO `admin_user` VALUES ('1', '2018-08-01 06:34:45', 'admin', 'c3284d0f94606de1fd2af172aba15bf3', '0', '[]', null, 'admin@qq.com', null, '13910037811', null, 'http://ytmd-library.oss-cn-beijing.aliyuncs.com/user/image/2a/ab/2aab-40e4-8477-9125b4c5516e-91d38c2e82fe-d41d8.png', 'admin', '1', null, '1819512345', '13910037811', null);
COMMIT;

-- ----------------------------
--  Table structure for `sessions`
-- ----------------------------
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
  `sid` varchar(32) NOT NULL,
  `expires` datetime DEFAULT NULL,
  `data` text,
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`sid`),
  KEY `index` (`sid`,`createdAt`,`updatedAt`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Session';

-- ----------------------------
--  Table structure for `sign_ddos_check`
-- ----------------------------
DROP TABLE IF EXISTS `sign_ddos_check`;
CREATE TABLE `sign_ddos_check` (
  `id` varchar(50) NOT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `_sign` varchar(50) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index` (`_sign`,`create_time`) USING BTREE,
  KEY `index_id` (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
